window.onload = function(){
    document.getElementById("demo").onclick = function () {
        alert(123);
    };
};